<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:52:"E:\WWW\waimai/app/wechat/shop\view\goods\detail.html";i:1505873848;s:53:"E:\WWW\waimai/app/wechat/shop\view\template\base.html";i:1509357109;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <title>外卖</title>
    <link rel="stylesheet" href="__STATIC__/css/mui.min.css">
    <link rel="stylesheet" href="__STATIC__/css/ks.css">
    
<style>
    .edit-content img{
        max-width: 100%;
    }
</style>

    <script>
        var require_path = "__STATIC__/app";
    </script>
    <script src="__STATIC__/app/require.js"></script>
    <script src="__STATIC__/app/require.config.js"></script>
    <script src="__STATIC__/app/plugin/jquery-3.2.1.min.js"></script>
    <script src="__STATIC__/app/plugin/mui/mui.min.js"></script>
    
</head>
<body>



    <header class="header">
        <div>
            <a class="back"><i class="iconfont icon-zuoyoujiantou-copy-copy-copy"></i></a>
            商品详情
        </div>
    </header>
    <div class="pages" >
        <!-- Swiper -->
        <div class="swiper-container">
            <div class="swiper-wrapper">
                <?php if(is_array($slide_image) || $slide_image instanceof \think\Collection || $slide_image instanceof \think\Paginator): $i = 0; $__LIST__ = $slide_image;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                <div class="swiper-slide">
                    <!--<a href=""><img src="../../../../public/wechat/static/image/fs.png"/></a>-->
                    <a ><img src="<?php echo $vo; ?>"/></a>
                </div>
                <?php endforeach; endif; else: echo "" ;endif; ?>
                <!--<div class="swiper-slide">-->
                <!--<a href=""><img src="../../../../public/wechat/static/image/fs.png"/></a>-->
                <!--</div>-->
            </div>
            <!-- Add Pagination -->
            <div class="swiper-pagination"></div>
        </div>
        <div id="data_ul">

            <div class="list-form other">
                <ul >
                    <li>
                        <h4><?php echo $info['name']; ?></h4>
                        <p>
                            <b class="color-primary">￥<?php echo $info['price']; ?></b>
                            <!--<span class="font12">月售185</span>-->
                        </p>
                        <!--<div class="absmiddle-right"><a class="btn color-primary">加入购物车</a></div>-->
                        <div class="count">
                            <?php if(($info['is_work']==1)): ?>
                            <span @tap="down_tap(<?php echo $info['v_price']; ?>,<?php echo $info['id']; ?>,<?php echo $info['v_flag']; ?>)" <?php if($info['quantity']>0): ?> style="display: inline;" <?php endif; ?> class="down"><i class="iconfont icon-wuuiconsuoxiao"></i></span>
                            <input type="tel" readonly <?php if($info['quantity']>0): ?> style="display: inline;" <?php endif; ?> class="num" value="<?php echo $info['quantity']; ?>" maxlength="3">
                            <span @tap="up_tap(<?php echo $info['price']; ?>,<?php echo $info['id']; ?>,<?php echo $info['v_flag']; ?>,'<?php echo $info['name']; ?>')" class="up"><i class="iconfont icon-wuuiconxiangjifangda"></i></span>
                            <?php else: ?>
                            <span  class="down" style="display: block;"> <i class="iconfont icon-wuuiconxiangjifangda"></i></span>
                            <?php endif; ?>
                        </div>
                    </li>

                    <ul>
                        <li><b>商品介绍</b></li>
                        <li class="edit-content ">
                            <p class="font12">
                                <?php echo $info['detail']; ?>
                            </p>
                        </li>
                    </ul>

                </ul>
                <!--评价-->
                <!--<ul>-->
                <!--<li>商品评价（好评率：100%）</li>-->
                <!--<li class="goods-list">-->
                <!--<ul>-->
                <!--<li>-->
                <!--<div class="img"><img src="../../../../public/wechat/static/image/timo.jpg" height="441" width="500"/></div>-->
                <!--<div class="text">-->
                <!--<div class="title">匿名用户</div>-->
                <!--<p class="ellipsis">好吃，很好吃，好吃上瘾!好吃，很好吃，好吃上瘾!好吃，很好吃，好吃上瘾!</p>-->
                <!--</div>-->
                <!--</li>-->
                <!--<li>-->
                <!--<div class="img"><img src="../../../../public/wechat/static/image/timo.jpg" height="441" width="500"/></div>-->
                <!--<div class="text">-->
                <!--<div class="title">匿名用户</div>-->
                <!--<p class="ellipsis">好吃，很好吃，好吃上瘾!好吃，很好吃，好吃上瘾!好吃，很好吃，好吃上瘾!</p>-->
                <!--</div>-->
                <!--</li>-->
                <!--<li>-->
                <!--<div class="img"><img src="../../../../public/wechat/static/image/timo.jpg" height="441" width="500"/></div>-->
                <!--<div class="text">-->
                <!--<div class="title">匿名用户</div>-->
                <!--<p class="ellipsis">好吃，很好吃，好吃上瘾!好吃，很好吃，好吃上瘾!好吃，很好吃，好吃上瘾!</p>-->
                <!--</div>-->
                <!--</li>-->
                <!--</ul>-->
                <!--</li>-->
                <!--</ul>-->
            </div>
            <?php if(($info['is_work']==1)): ?>
            <div class="foot-btn">
                <div style="padding:0;">
                    <!--<a href="<?php echo url('/cart/Cart/index'); ?>"> <i class="iconfont icon-gouwuche"></i></a>-->
                    <!--<span id="total_price">总价：0元</span>-->
                    <!--<a @tap="send_btn(<?php echo $info['store_id']; ?>)"  class="btn">去结算</a>-->


                    <!--<a href="<?php echo url('shop/Shop/index'); ?>" style="display:inline-block;-->
                    <!--height: 45px;width: 50%;margin-left: -15px; line-height: 45px; padding: 0 20px;-->
                    <!--background: #E76E70;color: #fff;text-align:center;box-sizing: border-box;-->
                    <!--border-radius:100px;font-size: 12px;">返回首页继续购买</a>-->
                    <!--<a href="<?php echo url('/cart/Cart/index'); ?>" style="display:inline-block;-->
                    <!--height: 45px;width: 50%;margin-right: -15px; line-height: 45px; padding: 0 20px;-->
                    <!--background: #FD2A4A;color: #fff;text-align:center;box-sizing: border-box;-->
                    <!--border-radius:100px;float: right;font-size: 12px;">去结算-->
                        <!--(<span id="total_price"><?php echo $total_price; ?>元</span>）</a>-->

                    <a href="<?php echo url('shop/Shop/index'); ?>" style="display: inline-block;width: 50%;height: 45px;line-height:45px;background: #E76E70;text-align:center;color: #fff;float: left;">返回首页继续购买</a>
                    <a href="<?php echo url('/cart/Cart/index'); ?>" style="display: inline-block;width: 50%;height: 45px;line-height:45px;background: #FD2A4A;text-align:center;color: #fff;float: left;">去结算(<span id="total_price"><?php echo $total_price; ?>元</span>)</a>
                </div>
            </div>
            <?php else: ?>
            <div  class="foot-btn color-gray">
                <div class="text-center" style="color: white;background-color: grey">
                    商家休息，停止接单
                </div>
            </div>
            <?php endif; ?>
        </div>


        <div class="popups-module">
            <div class="popups-module-wrap" id="popups">
                <div class="popups-module-box">
                    <!--<a class="btn">关闭</a>-->
                    <div class="specification">
                        <div class="title">{{v_goods_name}}</div>
                        <p>规格</p>
                        <ul class="box">
                            <template v-for="(item, index) in v_items">
                                <li v-bind:class="[index==a_index? 'active' : '']" @tap="variant(item.id,item.price,index)">
                                    {{item.name}}
                                </li>
                            </template>
                        </ul>
                    </div>
                </div>
                <div class="popups-module-footer">
                    <div class="specification">
                        <div class="price">
                            <span>￥{{v_price}}</span>
                            <a @tap="save_variant()" class="btn">确定</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


</body>
<script>
    if (document.querySelector('.goback') != null) {
        document.querySelector('.goback').addEventListener('tap', function () {
            history.back();
        })
    }

//

</script>

<script>
    var cart_url = "<?php echo url('cart/Cart/have_cart'); ?>";
    var send_order_url = "<?php echo url('order/Order/send_order'); ?>";
    var variant_url = "<?php echo url('shop/Goods/get_variant'); ?>";
    var add_cart_url = "<?php echo url('cart/Cart/add_cart'); ?>";
    var goods_url = "<?php echo url('shop/Goods/index'); ?>";
    var list_url = "<?php echo url('shop/Goods/detail'); ?>";
    var total_price = "<?php echo $total_price; ?>";
    var store_id = "<?php echo $store_id; ?>";
    document.querySelector('.back').addEventListener('tap', function () {
        window.location.href= goods_url+"/store_id/"+store_id;
    });
    require(['goods/detail']);
</script>

</html>